home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c
- Path: netcom.com!berliner
- From: berliner@netcom.com (Guy Berliner)
- Subject: Formatted print with variable output field width.
- Message-ID: <berlinerDpMBoE.AEn@netcom.com>
- Organization: NETCOM On-line Communication Services (408 261-4700 guest)
- Date: Tue, 9 Apr 1996 23:24:14 GMT
- Sender: berliner@netcom23.netcom.com
-
- Does anyone know of a way of creating a variable output field width?
- Say, for example, I wish to have a width of v+3, where v is some
- integer, the result of some calculation. Is there some way to say
- something like
-
- printf("%<v+3>.<v>f", floatingnum);
-
- where the result of the evaluation of v+3 and of v will be
- fed to printf?
-
- Guy Berliner
- --
- Finger berliner@netcom18.netcom.com for pgp key.
-